package com.base.data.elasticsearch.core;

import com.base.data.elasticsearch.util.JacksonUtil;

public class BaseDefaultEntityMapper implements BaseEntityMapper {

    @Override
    public String mapToString(Object object) {
        return JacksonUtil.toString(object);
    }

    @Override
    public <T> T mapToObject(String source, Class<T> clazz){
        return JacksonUtil.fromJson(source, clazz);
    }
}
